package org.openwork.portlet.skills.action;

import org.openwork.portlet.action.BaseAction;
import org.openwork.portlet.skillmanagement.service.SkillCategoryServiceUtil;

import com.liferay.portal.kernel.util.GetterUtil;
import com.liferay.portal.kernel.util.ParamUtil;
import com.liferay.portal.kernel.util.StringPool;

/**
 * 
 * @author samuelgmartinez
 *
 */
public class DeleteSkillCategoryAction extends BaseAction {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1222770619882520991L;

	@Override
	public String execute() throws Exception {
		String categoryId = ParamUtil.get(getServletRequest(), WebKeys.SKILL_CAT_ID_PARAM, StringPool.BLANK);
		
		SkillCategoryServiceUtil.deleteSkillCategory(GetterUtil.getLong(categoryId));
		return SUCCESS;
	}
		
}
